package hadoop.ch05.ll17124080231;

        import org.apache.hadoop.io.NullWritable;
        import org.apache.hadoop.mapreduce.Partitioner;
public class SoGouPartitioner extends Partitioner<NullWritable, Data>{
    @Override
    public int getPartition(NullWritable k2, Data v2, int numPartitioner) {


        if(v2.getRank() == 2 && v2.getOrder() == 1) {

            return 1%numPartitioner;
        }else {
            return 2%numPartitioner;
        }
    }
}
